package com.itheima.并发工具类.CountDownLatch;

import java.util.concurrent.CountDownLatch;

public class Child3 extends Thread{
    private CountDownLatch cdl;

    public Child3(CountDownLatch cdl) {
        this.cdl = cdl;
    }

    @Override
    public void run() {
        for (int i = 1; i <= 20; i++) {
            System.out.println(getName()+"在吃第"+i+"个饺子");
        }
        cdl.countDown();
    }
}
